package com.hzw.saas.service.msg.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzw.saas.api.msg.IMsgStatusService;
import com.hzw.saas.api.msg.query.MsgStatusQuery;
import com.hzw.saas.service.msg.mapper.MsgStatusMapper;
import com.hzw.saas.service.msg.model.MsgStatus;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
import ma.glasnost.orika.MapperFacade;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/1/7 18:57
 */
@RequiredArgsConstructor
@Service("msgStatusServiceImpl")
public class MsgStatusServiceImpl extends ServiceImpl<MsgStatusMapper, MsgStatus> implements IMsgStatusService, IService<MsgStatus> {

    private final MapperFacade mapperFacade;

    @Override
    public void saveOrUpdateBatch(List<MsgStatusQuery> msgStatusQueryList) {
        super.saveOrUpdateBatch(mapperFacade.mapAsList(msgStatusQueryList, MsgStatus.class));
    }
}
